class Config:
    project_fields = ['pid', 'state', 'cost', 'timecost', 'owner', 'contractor_name', 'contractor_url', 'pname', 'date',
                      'description', 'bids', 'bids_url ']

    project_index = {'pid': 0, 'state': 1, 'cost': 2, 'timecost': 3, 'owner': 4, 'contractor_name': 5,
                     'contractor_url': 6, 'pname': 7, 'date': 8, 'description': 9, 'bids': 10, 'bids_url ': 11}

    bid_fields = ['uid', 'bid_url', 'uname', 'win', 'projects_undertaken', 'favorable_rate', 'level_of_membership',
                  'general_income',
                  'skills', 'services', 'area']

    bid_index = {'uid': 0, 'bid_url': 1, 'uname': 2, 'win': 3, 'projects_undertaken': 4, 'favorable_rate': 5,
                 'level_of_membership': 6, 'general_income': 7, 'skills': 8, 'services': 9, 'area': 10}

    # bid黑名单
    blacklist = {'101763-pxsmart.html'}

    zbjblacklist = {'24110777', '18733217', '19510617', '29061682', '12163543', '31664898', '22606482', '29183719',
                    '31126440', '17839232', '30850189', '31375229', '19712688', '29338854', '31545129', '30893037',
                    '12781020', '14035038', '29461592', '30958895', '23896940', '18714546', '31052738', '24415454',
                    '31737512', '23251724'}

    def __init__(self):
        for i in range(len(Config.project_fields)):
            Config.project_index[Config.project_fields[i]] = i
        for i in range(len(Config.bid_fields)):
            Config.bid_index[Config.bid_fields[i]] = i


if __name__ == '__main__':
    Config()
    print(Config.bid_index)
    print(Config.project_index)
